package com.example.jasonrpc.client.byRegistry;

import com.example.jasonrpc.client.ClientConfig;
import com.example.jasonrpc.client.simple.RandomTransportSelector;
import com.example.jasonrpc.codec.JSONDecoder;
import com.example.jasonrpc.codec.JSONEncoder;
import com.example.jasonrpc.registry.RegistryDirectory;
import com.example.jasonrpc.transport.HttpTransportClient;

import java.util.List;

public class RpcClientConfigByRegistry extends ClientConfig {

    public RpcClientConfigByRegistry(List<RegistryDirectory> directories) {
        this.transportClientClass = HttpTransportClient.class;
        this.encoderClass = JSONEncoder.class;
        this.decoderClass = JSONDecoder.class;
        this.selectorClass = RandomSelectorByRegistry.class;
        this.connectCount = 1;
        this.directories = directories;
    }
}
